<style>
	td{ text-align: center;}
</style>
<div id="data_page" class="in_page">
	<div class="panel panel-default">
  <div class="panel-body">
   <form class="form-inline" action="{:U('Order/index')}"  method="post">

	  <div class="form-group">
	  <label for="p_type">类型</label>
	  <select class="form-control"  name="paystate">
	  	 <option value="">请选择</option>
		  <option value="0">未支付</option>
		  <option value="1">已支付</option>
		</select>
		 </div>
  	  <button type="submit" class="btn btn-sm btn-default">查询</button>
			
</form>
  </div>
</div>
      <table class="table table-bordered">
        <thead>
          <tr>
            <th><span class="glyphicon "></span>key</th>
            <th><span class="glyphicon "></span>姓名</th>  
            <th><span class="glyphicon "></span>电话</th> 
            <th><span class="glyphicon "></span>邮箱</th>
            <th><span class="glyphicon "></span>产品</th>
            <th><span class="glyphicon "></span>订单号</th>
            <th><span class="glyphicon "></span>流水号</th>
            <th><span class="glyphicon "></span>支付时间</th>
            <th><span class="glyphicon "></span>创建时间</th>
            <th><span class="glyphicon "></span>支付状态</th>
          	<th><span class="glyphicon "></span>发货状态</th>
           
            <th><span class="glyphicon "></span>操作</th>
          </tr>
        </thead>
        <tbody>
	        <volist name="list" id="li">
	        	
	       
			  <tr>
	            <th scope="row">{$key+1}</th>
	            <td>{$li.name}</td>
	            <td>{$li.phone}</td>
	            <td>{$li.email}</td>
	            <td>{$li.product}</td>
	            <td>{$li.order}</td>
	            <td>{$li.trade_no}</td>
	            <td>{$li.paytime}</td>
	            <td>{$li.time}</td>
	            <td><if condition="$li['paystate'] eq '0'" > 未支付<else/>已支付</if></td>
	            <td><if condition="$li['gostatus'] eq '0'" > 未发货<else/>已发货</if></td>
	           	<td>  
	           		<if condition="$li['paystate'] eq '1'" > 
	           	 <if condition="$li['gostatus'] eq '0'" > 
	           	 	<form action="{:U('Order/up')}"  method="post">	
	           	 	<input type="hidden"name="id" value="{$li.id}" />
	           	 	<button class="btn btn-primary btn-xs" type="submit" >发货</button>
	           	 	</form>
	           	 <else/>
	           	 已发货
	           	 </if>
	           	  <else/>
	           	  未支付
	           	  </if>
				 
	           </td>
	         </tr>
	        </volist>
        </tbody>
      </table> 
	  
	<nav>
		{$page}
	</nav>
</div>
